/*
 * @Description: 
 * @Author: yeeChen
 * @Date: 2022-12-21 14:35:34
 * @LastEditTime: 2022-12-21 16:36:28
 * @LastEditors: yeeChen
 */
const express = require('express')
const app = express()

app.use((req, res, next) => {
    console.log('调用了第一个中间件');
    next()
})

app.use((req, res, next) => {
    console.log('第二个中间件');
    next()
})

app.get('/', (req, res) => {
    console.log('这是/路由');
    res.send('Home page')
})

app.get('/user', (req, res) => {
    console.log('这是/user路由');
    res.send('User page')
})

app.listen(80, (req, res) => {
    console.log('express running at http://127.0.0.1');
})